package com.spsy.product.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.spsy.common.core.annotation.Excel;
import com.spsy.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Map;

/**
 * 商品详情对象 product_detail
 * 
 * @author ruoyi
 * @date 2025-09-28
 */
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ProductDetail extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 详情ID */
    private Long id;

    @TableField(exist = false) // 核心：告诉MyBatis-Plus该字段不参与数据库操作
    private Map<String, Object> params;

    /** 商品ID */
    @Excel(name = "商品ID")
    private Long productId;

    /** 商品描述 */
    @Excel(name = "商品描述")
    private String description;

    /** 规格参数 */
    @Excel(name = "规格参数")
    private String specifications;

    /** 包装清单 */
    @Excel(name = "包装清单")
    private String packingList;

    /** 售后服务 */
    @Excel(name = "售后服务")
    private String afterService;

    /** 详情图片 */
    @Excel(name = "详情图片")
    private String detailImages;

    /** 逻辑删除：0-未删除，1-已删除 */
    @Excel(name = "逻辑删除：0-未删除，1-已删除")
    private Integer deleted;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setSpecifications(String specifications) 
    {
        this.specifications = specifications;
    }

    public String getSpecifications() 
    {
        return specifications;
    }

    public void setPackingList(String packingList) 
    {
        this.packingList = packingList;
    }

    public String getPackingList() 
    {
        return packingList;
    }

    public void setAfterService(String afterService) 
    {
        this.afterService = afterService;
    }

    public String getAfterService() 
    {
        return afterService;
    }

    public void setDetailImages(String detailImages) 
    {
        this.detailImages = detailImages;
    }

    public String getDetailImages() 
    {
        return detailImages;
    }

    public void setDeleted(Integer deleted) 
    {
        this.deleted = deleted;
    }

    public Integer getDeleted() 
    {
        return deleted;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("productId", getProductId())
            .append("description", getDescription())
            .append("specifications", getSpecifications())
            .append("packingList", getPackingList())
            .append("afterService", getAfterService())
            .append("detailImages", getDetailImages())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("deleted", getDeleted())
            .toString();
    }
}
